package com.ruoyi.ring.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 群组成员对象 az_ring_group_member
 * 
 * @author liuwp
 * @date 2025-10-20
 */
@Data
public class RingGroupMember extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 群组ID */
    @Excel(name = "群组ID")
    private Long groupId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 成员账号 */
    @Excel(name = "成员账号")
    private String memberAccount;
    /** 成员名称 */
    @Excel(name = "成员名称")
    private String memberName;

    /** 成员头像 */
    @Excel(name = "成员头像")
    private String memberAvatar;

    /** 加入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "加入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date joinTime;

    /** 是否同步，字典：sys_yes_no */
    @Excel(name = "是否同步，字典：sys_yes_no", dictType = "sys_yes_no")
    private String idSynchronize;
    /** 成员类型，字典：az_member_type */
    @Excel(name = "成员类型，字典：az_member_type", dictType = "az_member_type")
    private String memberType;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("groupId", getGroupId())
            .append("userId", getUserId())
            .append("memberName", getMemberName())
            .append("joinTime", getJoinTime())
            .append("idSynchronize", getIdSynchronize())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
